package cn.iocoder.yudao.module.scrm.dal.mysql.customerassistants;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.scrm.dal.dataobject.customerassistants.CustomerAssistantsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.scrm.controller.admin.customerassistants.vo.*;

/**
 * 客户协作人 Mapper
 *
 * @author admin
 */
@Mapper
public interface CustomerAssistantsMapper extends BaseMapperX<CustomerAssistantsDO> {

    default PageResult<CustomerAssistantsDO> selectPage(CustomerAssistantsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CustomerAssistantsDO>()
                .eqIfPresent(CustomerAssistantsDO::getCustomerId, reqVO.getCustomerId())
                .eqIfPresent(CustomerAssistantsDO::getUserId, reqVO.getUserId())
                .orderByDesc(CustomerAssistantsDO::getId));
    }

}